import java.util.ArrayList;

public class Episode 
{
	private Location firstLocation;
	private Location secondLocation;
	private long timestamp;


	private ArrayList<Location> pLocations;
	
	public Episode(Location firstLocation, Location secondLocation) {
		super();
		this.firstLocation = firstLocation;
		this.secondLocation = secondLocation;
	}
	
	public Episode()
	{
		pLocations = new ArrayList<>();
	}


	public void addLocation(Location l)
	{
		pLocations.add(l);
	}
	
	public ArrayList<Location> getPattern()
	{
		return pLocations;
	}
	
	public Location getFirstLocation() {
		return firstLocation;
	}


	public void setFirstLocation(Location firstLocation) {
		this.firstLocation = firstLocation;
	}


	public Location getSecondLocation() {
		return secondLocation;
	}


	public void setSecondLocation(Location secondLocation) {
		this.secondLocation = secondLocation;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((firstLocation == null) ? 0 : firstLocation.hashCode());
		result = prime * result
				+ ((secondLocation == null) ? 0 : secondLocation.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Episode other = (Episode) obj;
		if (firstLocation == null) {
			if (other.firstLocation != null)
				return false;
		} else if (!firstLocation.equals(other.firstLocation))
			return false;
		if (secondLocation == null) {
			if (other.secondLocation != null)
				return false;
		} else if (!secondLocation.equals(other.secondLocation))
			return false;
		return true;
	}


	public long getTimestamp() {
		return timestamp;
	}


	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}



	
	
}
